# YorKin makefile
all : ex0 ex0.dbg only_text text_rodata text_rodata_data all_sections
ex0 : ex0.c
	mcc ex0.c -S -O7 -o ex0.s
	mcc ex0.c -o ex0.out -O7 -m > ex0.map
ex0.dbg : ex0.c
	mcc ex0.c -S -g -o ex0.dbg.s
	mcc ex0.c -o ex0.dbg.out -g
only_text : only_text.c
	gcc only_text.c -nostdlib -o only_text.out
text_rodata : text_rodata.c
	gcc text_rodata.c -nostdlib -o text_rodata.out
text_rodata_data : text_rodata_data.c
	gcc text_rodata_data.c -nostdlib -o text_rodata_data.out
all_sections : all_sections.c
	gcc all_sections.c -nostdlib -o all_sections.out
clean:
	@rm -f *.out ex0 only_text text_rodata all_sections text_rodata_data
	@rm -f *.map ex0
	@rm -f *.s ex0
	@echo Clean Complete.
